package la.bbs558.entity.params;

import com.fasterxml.jackson.annotation.JsonProperty;
import la.bbs558.aop.valid.Valid;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 发帖(BbsPostParams)
 *
 * @author weihanmin
 * @since 2023-12-17 11:05:07
 */
@Data
@Accessors(chain = true)
public class BbsPostParams {
    /**
     * 主题分类id
     */
    @Valid(msg = "缺少主题分类id")
    private Long classId;
    /**
     * 标题
     */
    @Valid(msg = "缺少标题")
    private String title;
    /**
     * 内容
     */
    @Valid(msg = "缺少发帖内容")
    private String content;
    /**
     * 媒体内容
     */
    private String mediaJson;
    /**
     * 是否需要审核
     */
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Boolean needAudit = true;
    /**
     * 发帖人
     */
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Long userId;
    /**
     * 发帖时间
     */
    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    private Date postTime;

}
